package useFn;

public class demo {
    public static void main(String[] args) {
        myThread thread = new myThread("我是名字");
        myThread thread2 = new myThread("我是名字2");
        System.out.println(thread.getName());
        System.out.println(thread2.getName());
    }
}

class myThread extends  Thread{
    public myThread(String name) {
        super(name);
    }
    @Override
    public void run() {
        super.run();
    }
}